package com.itheima.work1118;

public class Tset {
    public static void main(String[] args) {
        Student s1 = new Student();

        try {
            s1.setName("伊安泽");
            s1.setAge(20);
//            s1.setAge(10);
            s1.setSex("男");
        } catch (SexException e) {
            System.out.println("性别错误"+e.getMessage());
        }catch (AgeException e){
            System.out.println("年龄不合法"+e.getMessage());
        }

    }
}
